//服务BASE路径
const bases = 'http://zsq.free.idcfengye.com/'
const base = 'https://jcy2.secsoft.cn:22335/ywxt/'

//所有请求的地址'
const urls = {
  base: base,
  bases: bases,
  // https: 'https://api.xfyun.cn/v1/service/v1/iat',
  // files: 'http://192.168.1.114:8080/kd/kdsx',
  // files: 'http://192.168.1.114:8080/sa/bdyy',

  // 测试是否登录过
  attestation: base+'vuser/attestation',

  login: base + 'wxa/user/login',
  info: base + 'wxa/user/info',
  //  单位
  getUsercom: base +'vuser/getUsercom',
  //部门
  getUserdep: base + 'vuser/getUserdep',
  //地址
  getReg: base + 'vuser/getReg',
  //用户认证
  userAttestation: base + 'vuser/userAttestation',
  //用户详情
  details: base + 'vuser/details',
  //修改用户信息
  getUserUpdate: base + 'vuser/getUserUpdate',
  
  //工作状态
  workState: base + 'vuser/workState',
  //用户工单
  gdck: base + 'vorder/gdck',
  //用户工单详情
  ordersDetails: base + 'vorder/ordersDetails',
  //用户评价
  evaluate: base + 'vorder/evaluate',
  //取消订单
  qxgd: base + 'vorder/qxgd',
  


  //类别
  sort: base + 'vorder/sort',
  //新增 状态
  state: base + 'vorder/state',
  //上传语音
  bdyy: base + 'vorder/bdyy',
  //上传工单
  addOrder: base + 'vorder/addOrder',
  

  //运维首页
  ywsy: base + 'vorder/ywsy',
    //运维首页
  workState: base + 'vuser/workState',
  //受理
  ywsl: base + 'vorder/ywsl',
  //拒绝
  ywjj: base + 'vorder/ywjj', 
  //完成
  ywwc: base + 'vorder/ywwc', 
  
}
function http(url, param, callBack) {
  wx.request({
    url: url,
    data: param,
    method: 'GET',
    header: {
      "Content-Type": "json"
    },
    success: function (res) {
      if (res.statusCode == 200) {
        callBack(res.data);
      } else {

        wx.showToast({
          title: '网络出错',
          icon: 'none'
        })
      }
    },
    fail: function (error) {
      wx.showToast({
        title: error,
        icon: 'none'
      })
    }
  })
}
module.exports = {
  urls: urls,
  http: http
}